-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update backup framework enabled config to global scope #11567
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Update backup framework enabled config to global scope #11567
Conversation
|
@blueorangutan package |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11567 +/- ##
=========================================
Coverage 16.26% 16.26%
Complexity 13419 13419
=========================================
Files 5658 5658
Lines 499425 499425
Branches 60613 60612 -1
=========================================
+ Hits 81232 81235 +3
+ Misses 409143 409142 -1
+ Partials 9050 9048 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
abh1sar
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove this at line 983. Otherwise backup apis won't show if backup framework is enabled at zone but disabled globally.
if (!BackupFrameworkEnabled.value()) {
return cmdList;
}
2f0ee6d to
b0b037f
Compare
|
@blueorangutan package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR moves the backup framework enabled configuration from zone-scoped to global-scoped, simplifying the backup management by removing per-zone enablement checks. The change affects how the backup framework determines if it's enabled, removing the need to check individual zones.
Key Changes
- Removed zone-specific backup framework configuration support
- Simplified backup enablement logic to use global configuration only
- Updated error messages to reflect global scope
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| api/src/main/java/org/apache/cloudstack/backup/BackupManager.java | Removes zone scope from backup framework configuration key |
| server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java | Updates backup enablement checks to use global configuration and removes zone-specific logic |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java
Show resolved
Hide resolved
server/src/main/java/org/apache/cloudstack/backup/BackupManagerImpl.java
Show resolved
Hide resolved
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✖️ el8 ✖️ el9 ✖️ debian ✖️ suse15. SL-JID 14918 |
233ce0d to
08aaaaf
Compare
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15153 |
08aaaaf to
2dffcda
Compare
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15163 |
|
@blueorangutan test |
|
@sureshanaparti a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
updated title & description. |
| public List<Class<?>> getCommands() { | ||
| final List<Class<?>> cmdList = new ArrayList<Class<?>>(); | ||
| if (!BackupFrameworkEnabled.value()) { | ||
| if (!BackupFrameworkEnabled.value() && !BackupFrameworkEnabled.hasValueInScope(Boolean.TRUE.toString())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not restrict/allow API access based on the zone config value. It might break UI/clients.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shwstppr it doesn't restrict API access. it allows API access if it is enabled in global or in any zone (not mandatory to enable in global scope). previously, enabling at global level is mandatory for API access.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti I understand that, but won't it create an issue in UI showing backup-related options for zones and for zone resources where backup feature is not enabled?
eg: assignVirtualMachineToBackupOffering action will start showing for all VMs, deploy VM form will start showing backup options even for zone where option isn't available.
Though, this could be currently true for the other way around as well
|
@shwstppr @weizhouapache @abh1sar can you have another look, please? |
shwstppr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine if others think APIs should be controlled with zone configs, but I don't find it consistent with the current auto-discovery behaviour of clients
| public List<Class<?>> getCommands() { | ||
| final List<Class<?>> cmdList = new ArrayList<Class<?>>(); | ||
| if (!BackupFrameworkEnabled.value()) { | ||
| if (!BackupFrameworkEnabled.value() && !BackupFrameworkEnabled.hasValueInScope(Boolean.TRUE.toString())) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sureshanaparti I understand that, but won't it create an issue in UI showing backup-related options for zones and for zone resources where backup feature is not enabled?
eg: assignVirtualMachineToBackupOffering action will start showing for all VMs, deploy VM form will start showing backup options even for zone where option isn't available.
Though, this could be currently true for the other way around as well
|
Sorry @sureshanaparti , I don't remember if it was discussed before. But what about making this config global scope only? |
|
Hi @sureshanaparti @shwstppr are all the review comments addressed on this PR? If that is the case, is it ready for testing? |
|
@nvazquez I don't have a strong opinion either way and others can chime in |
|
if the new behavior applies on all the zone/global settings, and documented , I am ok with it |
|
I think it would be better to make this setting global. With the solution of having per Zone setting and still showing backup APIs to other zones, there will be confusion and IMO it doesn't solve anything. |
2dffcda to
e036a51
Compare
@abh1sar as discussed, backup config is updated to global setting again (reverted current changes). please check. |
|
@blueorangutan package |
|
@sureshanaparti a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16610 |
Description
This PR enables backup framework when the config 'backup.framework.enabled' is set to true in Zone scope and not in Global setting. It checks backup framework enabled config is set to true or not in any of the zone scope setting when disabled in Global scope, thus supporting backup in a specific zone (and not entire cloud deployment).
Doc PR: apache/cloudstack-documentation#579
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?